Skip to content

ci: cursor rules for consistent quality docstring production #7316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CakeCrusher
Copy link
Contributor

@CakeCrusher CakeCrusher commented Apr 28, 2025

Cursor rule for producing consistent quality docstrings.

Use with Ctrl+k or side Chat to produce a 90% complete quality docstring.

Note: does not work for tabbing https://forum.cursor.com/t/does-cursor-tab-use-rules-for-ai-or-cursorrules/39355

@github-project-automation github-project-automation bot moved this to 📘 Todo in phoenix Apr 28, 2025
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 28, 2025
@CakeCrusher CakeCrusher changed the title DEV: cursor rules for consistent quality docstring production ci: cursor rules for consistent quality docstring production Apr 28, 2025
ExceptionType: When and why this exception is raised.
""" # noqa: E501
```
_Note: Inclide ` # noqa: E501` to avoid conflicts with CI._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be a typo in the note: Inclide should be Include.

Suggested change
_Note: Inclide ` # noqa: E501` to avoid conflicts with CI._
_Note: Include ` # noqa: E501` to avoid conflicts with CI._

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

## Types
- Use Python type annotations in function signatures
- Use descriptive types in docstrings (`dict` instead of `Dict`, etc.)
- For unions use `type1 or type2`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is missing a newline at the end, which is a common standard in text files. Adding a newline after the last line will ensure compatibility with various tools and follow standard file formatting conventions. This can be fixed by simply adding an empty line after - For unions use type1 or type2``

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +2 to +3
description:
globs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description and globs fields are currently empty in the rule configuration. For the rule to function properly:

  1. Add a descriptive summary to the description field (e.g., "Enforces Google-style docstrings for Python code")
  2. Specify target files in the globs field (e.g., "*.py") to define which files this rule should apply to

While alwaysApply: true is set, explicitly defining these fields will improve rule clarity and maintainability.

Suggested change
description:
globs:
description: "Enforces Google-style docstrings for Python code"
globs: "*.py"

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: 📘 Todo
Development

Successfully merging this pull request may close these issues.

1 participant